[#import "/framework/JGP.htm"  as JGP]
<!--
项目   jgp-cloud-parent
作者   LOUFEI [Gavin]
时间   2018/9/10
-->
[@JGP.head "Title"/]
[@JGP.body]
    <jgp-div _row="['50','*']" _runit="px">
        <div slot="1-1">
            <jgp-btn _fn="save">保存</jgp-btn>
        </div>
        <jgp-panel slot="2-1">
            <jgp-form _id="articleForm"
                      _action="/doc/articleApiController/saveArticle"
                      _fdata='${fdata!''}'>
                <jgp-text _name="title" _label="标题" _col="12" _required="true"></jgp-text>
                <jgp-text _name="author" _label="作者" _col="12"></jgp-text>
                <jgp-text _name="original" _label="出处" _col="12"></jgp-text>
                <jgp-rich-editor _name="contentId" _col="12" _id="articleEditor" _height="352"></jgp-rich-editor>
            </jgp-form>
        </jgp-panel>
    </jgp-div>

[/@JGP.body]

[@JGP.foot]
    <script>
        function save() {
            var editor = JGP.richEditor('articleEditor');
            editor.save(function () {
                var form = JGP.form('articleForm');
                form.ajaxSubmit(function () {
                    JGP.$close(true);
                });
            })
        }
    </script>
[/@JGP.foot]